home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1996 November / macformat-043.iso / mac / Shareware Plus / Developers / OpenStack Rinaldi Collection / openstack-rinaldi-lib / TextRes 2.3 (US) / TextRes 2.3 (US).rsrc / HELP_5635 next >
Encoding:
Text File  |  1996-01-08  |  5.8 KB  |  119 lines

  1.  
  2.  
  3.                                             TextRes 2.3
  4.  
  5.                                          by Frédéric RINALDI
  6.  
  7.  
  8. DESCRIPTION
  9.   TextRes allows to create any kind of resource in a file.
  10.  
  11. SYNTAX
  12.            TextRes <text>,<res type>[,<res ID>][,<res name>][,<fileName>]
  13.                         [,<#nb>][,<sep.char>][,<replace>][,"hex"][,"f=<flag(s)>"]
  14.  
  15. PARAMETERS
  16.    <text> is the text that will be written as resource in the file.
  17.  
  18.    <res type> is a four chars string, case sensitive, giving the resource type.
  19.  
  20.    <res ID> is an integer. If not supplied, any free ID will be used.
  21.  
  22.    <res name> defines the name of the created resource.
  23.  
  24.    <fileName> is the pathname of the destination file. Default is current resource file.
  25.  
  26.    <#nb> allows to give the entry number for a STR# resource (ex : "#1"). Using "#0" allows to deal with the last entry of the resource. Ignored for all other resource types.
  27.  
  28.    <sep.char> is useful only with STR# ot STR resource creation, and allows to define the entries separator. Automatically recognized as default.
  29.  
  30.    <replace> is a boolean, making all previous resource(s) with same name or ID to be replaced by the new one. Default is false. If <#nb> is used, then this param allows to switch between insertion (false, default) and replacement (true) of the designed STR# item.
  31.  
  32.    "hex" allows to input an hexadecimal string rather that ASCII. (Format : "XX XX XX…", as returned by ResText XFCN).
  33.  
  34.    "f=<flag(s)>" allows to set resources flag bits, where <flag(s)> can contain the following chars in any order:
  35.    C (changed), R (pReload), P (Protected), L (Locked), U (pUrgeable)
  36.     and S (Sustem heap).
  37.  
  38.    Using "!", "?" and "=" as first parameter will return an online help (resp. copyright,  syntax and output).
  39.  
  40. USING
  41.    The XCMD writes the new resource to choosen file, and returns <ID[,name]> of the new resource in the result.
  42.  
  43.    If no ID is supplied, then any free one will be used.
  44.  
  45.    If the supplied file name doesn't exist, it is created by the XCMD.
  46.  
  47.    Unless "hex" is used, all control chars representations "[0]"…"[255]" will be replaced in the input string by their corresponding chars (as returned by ResText XFCN).
  48.  
  49.    Two special cases must be considered:
  50.  
  51.    STR: these resources may have both text (limited to 255 chars) & datas (unlimited size). Input can be a two lines string (or other kind of item, depending on <sep. char> parameter), being respectively the text and the datas to write in the resource.
  52.  
  53.    STR#: these resources may have up to 32767 entries (each limited to 255 chars). Input can be a N lines string (or other kind of item, depending on <sep. char> parameter). Using <#nb> parameter, you can only change a given entry in the resource without needing to completely re-define it, or even insert a new one. Using "#0" allows to either replace the last entry (<replace> = true) or add a new entry at the end of the resource (<replace> = false).
  54.  
  55. Hint:
  56.    For STR & STR# creation, if you need to put the same char as current <sep. char> in the resource and don't use "hex" input, simply use "[<ASCII value>]" (ex: "[13]" for return or "[44]" for comma).
  57.  
  58. ERRORS
  59.    If an error occurs, the Result can return :
  60.      "Error : Not a file"
  61.      "Error : Alias file not supported"
  62.      "Error : Volume not found"
  63.      "Error : Bad Name"
  64.      "Error : File not found"
  65.      "Error : Folder not found"
  66.      "Error : File is busy"
  67.      "Error : I/O Error"
  68.      "Error : Volume is full"
  69.      "Error : Volume is locked"
  70.      "Error : Duplicate file/folder name"
  71.      "Error : AppleShare insufficient privileges"
  72.      "Error : No more disk space"
  73.      "Error : Duplicate resource ID"         (only if Replace = FALSE)
  74.      "Error : Duplicate resource name"    (only if Replace = FALSE)
  75.      "Error : Bad hex string"
  76.      "Error : Missing or empty parameter(s)"
  77.      "Error : Bad resource type"
  78.      "Error : Incorrect STR# item number"
  79.      "Error : Out of memory"
  80.      "Error : Couldn't create or change resource"
  81.      "Error : Incorrect flag char"
  82.  
  83. HISTORY
  84. 2.3                                                                                         07/15/94
  85. • Fixed a bug arising in 24 bits memory mode.
  86.  
  87. 2.2                                                                                         03/25/94
  88. • Added "f=<flag(s)>" parameter
  89.  
  90. 2.1                                                                                         02/07/94
  91. • Replacement of <ASCII value> by control chars 15 times faster!
  92.  
  93. 2.0                                                                                         03/25/93
  94. • Complete re-write
  95. • Added <hex> param
  96. • Added STR# entry param
  97. • Creation of STR datas now possible
  98. • "[<ASCII value>]" now replaced in input string           
  99.                                                                                         
  100. 1.4                                                                                         05/05/92
  101. • Added <replace> param
  102.  
  103. 1.3                                                                                         03/09/92
  104. • Destination file can already be open
  105.  
  106. 1.2                                                                                         03/07/92
  107. • Fixed parameter parser
  108.  
  109. 1.1                                                                                         02/23/92
  110. • First public release
  111. --------------------------------------------------------------------
  112.    All externals included in this stack are FreeWare and may be used in non-commercial software provided the following notice is visibly present :
  113.  
  114.                    TextRes XCMD © Frederic Rinaldi, 1989…1993.
  115.  
  116.    Free for non-commercial use. Use in commercial software subjected to prior acknowledgement and licensing from the author, reachable at the following network addresses:
  117.  
  118. AppleLink: RINALDI1   CalvaCom : FR10    Compuserve : 71170,2111
  119.                Internet : RINALDI1@APPLELINK.APPLE.COM